<html>

<body>
	
	<?php $this->load->helper('form');?>			
				
	<?php echo form_open('genrecontrol'); ?>

	<?php $this->load->helper('array');
	?>
<?php for ($i = 0; $i < count($detail); $i++){?>
	<?php foreach (current($detail) as $film) { ?>
		<br><?php echo $film->TITLE; ?>
		<br><?php echo $film->YEAR;?>
	<?php } ?>
	<select name='genre<?php $i;?>'> 
	<option></option>
	<?php foreach (current($genre) as $gen){?>
		<option><?php echo $gen->GENRE; ?></option>
	<?php } ?>
	</select>
	<?php next($detail);
	next($genre);?>
<?php }?>
	<br><?php echo form_submit('submit', 'Sumbit', 'id="submit"'); ?>

	<?php echo form_close(); ?>
</body>

</html>